#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "../../ProgramSet/programset.h"
#include "../../ProgramSet/programtexttransfer.h"


MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    ProgramSet programSet;
    ProgramTextTransfer programTextTransfer(0);
    QVector <QString> cmdList_Out;
    QVector <PointPro> pointList_out;
    QVector <PlRegStruct> regPlList_out;
    QVector <StackInfo> palletStackInfo_out;

    QString filePath = "/agvwork/AgvFundation/fundation/data/robotData1/program/tcpTest.txt";
    int result = programTextTransfer.transferText(filePath,cmdList_Out,pointList_out, regPlList_out,palletStackInfo_out);
    qDebug() << result;
    programSet.transferTextInstructionToStructData(cmdList_Out,0,"TcpInstruction",0,0);
}

MainWindow::~MainWindow()
{
    delete ui;
}
